package com.taoxue.services;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.taoxue.dao.CountryDao;
import com.taoxue.model.Country;
@Component
public class TestService {
	@Autowired
	private CountryDao countryDao;
	@Transactional(propagation=Propagation.REQUIRED)
	public void test(){
		Country c = new Country();
		c.setContinent(1);
		c.setName("test");
		countryDao.save(c);
	}
}
